package com.zzjson.design.singleton;

/**
 * <p>****************************************************************************</p>
 * <p><b>Copyright © 2010-2018 rollBall team All Rights Reserved<b></p>
 * <ul style="margin:15px;">
 * <li>Description : cn.zzjson.design.singleton</li>
 * <li>Version     : 1.0.0</li>
 * <li>Creation    : 2018年12月03日</li>
 * <li>@author     : zzy0_0</li>
 * </ul>
 * <p>****************************************************************************</p>
 */
public class Singleton2 {
    private Singleton2() {

    }
    private static volatile Singleton2 instance = null;

    public static Singleton2 getInstance() {
        if (null != instance) {
            synchronized (Singleton2.class) {
                if (null != instance) {
                    instance = new Singleton2();
                }
            }
        }
        return instance;
    }
}